#ifndef _TREE_H
#define _TREE_H


typedef struct tree_node * bin_tree;
typedef struct bin_tree position;
struct tree_node { 
	char data;
	bin_tree left;
	bin_tree right;
	int flag;
};//树的结构体

void creat_tree(bin_tree *T );
void pre_order_traversal(bin_tree BT);
void in_order_traversal(bin_tree BT);
void  post_order_traversal(bin_tree BT);
void level_order_traversal(bin_tree BT);

int check(bin_tree BST,int V) ;
int judge(bin_tree BST, int N);

bin_tree make_tree(int Y);
bin_tree new_node(int X);

bin_tree insert(int X, bin_tree BST);/*二叉搜索树建立*/
bin_tree delete_tree(int X, bin_tree BST);/*二叉搜索树删除*/
#endif